package com.boomsecret.pattern.observer.java;

/**
 * Created by wangjinliang on 2018/1/25.
 */
public class JavaObserverPatternDemo {
    public static void main(String[] args) {
        JavaPlatform javaPlatform = new JavaPlatform();
        JavaWeixin a = new JavaWeixin("a");
        JavaWeixin b = new JavaWeixin("b");
        javaPlatform.addObserver(a);
        javaPlatform.addObserver(b);
        javaPlatform.mineNotifyObservers();
        javaPlatform.deleteObserver(a);
        javaPlatform.mineNotifyObservers();
    }
}
